// 用户相关类型
export interface User {
  id: number
  username: string
  email: string
  nickname?: string
  bio?: string
  avatarUrl?: string
  role: 'USER' | 'ADMIN' | 'MODERATOR'
  status: 'ACTIVE' | 'INACTIVE' | 'BANNED'
  createdAt: string
  updatedAt: string
}

export interface CreateUserRequest {
  username: string
  email: string
  password: string
  nickname?: string
  bio?: string
  avatarUrl?: string
}

// 公告相关类型
export interface Announcement {
  id: number
  title: string
  content: string
  author: AuthorInfo
  status: 'DRAFT' | 'PUBLISHED' | 'ARCHIVED'
  priority: 'LOW' | 'NORMAL' | 'HIGH' | 'URGENT'
  isPinned: boolean
  createdAt: string
  updatedAt: string
}

export interface AuthorInfo {
  id: number
  username: string
  nickname?: string
  avatarUrl?: string
}

export interface CreateAnnouncementRequest {
  title: string
  content: string
  authorId: number
  priority?: 'LOW' | 'NORMAL' | 'HIGH' | 'URGENT'
  isPinned?: boolean
}

export interface UpdateAnnouncementRequest {
  title?: string
  content?: string
  status?: 'DRAFT' | 'PUBLISHED' | 'ARCHIVED'
  priority?: 'LOW' | 'NORMAL' | 'HIGH' | 'URGENT'
  isPinned?: boolean
}

// LLM相关类型
export interface ChatMessage {
  role: 'user' | 'assistant' | 'system'
  content: string
}

export interface ChatRequest {
  message: string
  history?: ChatMessage[]
  model?: string
  maxTokens?: number
  temperature?: number
  provider?: 'openai' | 'custom'
}

export interface ChatResponse {
  message: string
  model?: string
  tokensUsed?: number
  provider?: string
}

// 分页相关类型
export interface PageRequest {
  page?: number
  size?: number
  sortBy?: string
  direction?: 'ASC' | 'DESC'
}

export interface PageResponse<T> {
  content: T[]
  totalPages: number
  totalElements: number
  size: number
  number: number
  first: boolean
  last: boolean
  empty: boolean
}
